<template>
	<view class="page">
		<image class="img" :src="data.image" mode="widthFix"></image>
		<view class="content">{{data.caseContent || ''}}</view>
	</view>
</template>

<script>
	import {
		requestExampleDetail
	} from '@/apis/request.js'

	export default {
		data() {
			return {
				id: '',
				data: {}
			};
		},
		onLoad(options) {
			this.id = options.id;
			this.getDetail();
		},
		methods: {
			getDetail() {
				requestExampleDetail({
					id: this.id
				}).then(res => {
					this.data = res || {}
				});
			}
		}
	};
</script>

<style lang="scss" scoped>
	.page {
		min-height: 100vh;
		background: #FFFFFF;

		.img {
			width: 100%;
		}

		.content {
			padding: 20rpx 30rpx;
			line-height: 1.3;
		}
	}
</style>